import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    sessionInvalid: false, // session是否失效，false没有失效，true已失效，需重新登录
    userInfo: {}
  },
  mutations: {
    setSessionInvalid(state, value) {
      state.sessionInvalid = value
    },
    setUserInfo(state, value) {
      state.userInfo = value
    }
  },
  actions: {},
  modules: {}
})
